<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:t="http://myfaces.apache.org/tomahawk">

<ui:composition	template="/layouts/CrudIncluirAlterar.xhtml">
	<ui:param name="bean" value="#{ManageOrientacao}" />
	
	<ui:define name="breadcrumb_content">
		<h:outputLink value="#" styleClass="active">
			<h:outputText value="Orientação de Aluno" rendered="#{not bean.dadosForm.newRecord}"></h:outputText>
		</h:outputLink>
	</ui:define>

	<ui:define name="quick_links">
	</ui:define>


						
	<ui:define name="CAMPOS">
		<fieldset id="dados">
		<span class="warning">* os itens marcados são obrigatórios</span>
		<h:panelGroup  id="form">
			<ul>
				<li class="dados-form">
					<h:outputLabel value="Instrumento de conclusão:" ><span class="required">*</span></h:outputLabel>
					<h:selectOneMenu  value="#{bean.dadosForm.instrumentoConclusao}" converter="SimpleIndexConverter">
						<f:selectItem itemLabel="Selecione um Item" itemValue="#{null}"/>
						<t:selectItems value="#{bean.instrumentosConclusao}" 
								itemLabel="#{item.aluno.nome} - #{item.titulo}" itemValue="#{item}" var="item" />
					</h:selectOneMenu>
				</li>
				<li><h:outputLabel value="Título:" ><span class="required">*</span></h:outputLabel>
					<h:inputText
					value="#{bean.dadosForm.titulo}" />
				</li>
				<li><h:outputLabel value="Mensagem:" ><span class="required">*</span></h:outputLabel>
					<h:inputTextarea rows="8"
					value="#{bean.dadosForm.mensagem}" />
				</li>
				<li>
						<h:outputLabel value="Finalizar Instrumento?:" ></h:outputLabel>
						<h:selectBooleanCheckbox 
						value="#{bean.dadosForm.finalizarInstrumento}" label="Finalizar Instrumento?">
							<a4j:support action="#{bean.doNothing}" event="onclick" reRender="form"/>
						</h:selectBooleanCheckbox>
				</li>
				<li>
					<h:panelGroup rendered="#{bean.dadosForm.finalizarInstrumento}">
						<h:outputLabel value="Arquivo final:" ><span class="required">*</span></h:outputLabel>
						<t:inputFileUpload value="#{bean.anexoFinal}"
							storage="file"></t:inputFileUpload>
					</h:panelGroup>
					<t:saveState value="#{bean.anexoFinal}"/>
					<t:saveState value="#{bean.dadosForm.finalizarInstrumento}"/>
				</li>
			</ul>
		</h:panelGroup>
		</fieldset>
	</ui:define>
	
</ui:composition>

</html>
